home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d16
/
oriel.arc
/
DEMO.ORL
< prev
next >
Wrap
Text File
|
1991-07-31
|
5KB
|
169 lines
{-----------------------------DEMO.ORL-------------------------------
This is the main Oriel demo script. It serves as a front-end shell
for launching the other demo programs. It creates a menu, puts up a
series of "buttons" that the user can click on, and accepts keyboard
and mouse input.
-------------------------------------------------------------------}
{Initialize variable}
Set Mouse_message = 0
{Maximize the window and set the caption}
SetWindow(MAXIMIZE)
UseCaption("Oriel for Windows Product Demo")
{Set up the menu}
SetMenu("&Options",IGNORE,
"&Introduction",Do_Intro,
"&Features",Do_Features,
"&Hypertext",Do_Hyper,
"&Color Palette",Do_Color,
"Oriel &Draw",Do_Draw,
"&Applications",Do_WinApps,
ENDPOPUP,
"&Exit",Shut_Down,
ENDPOPUP)
{Draw the background}
UseBackground(TRANSPARENT,0,255,255) {Light blue background}
DrawBackground
{Put large text and icon at top of screen}
UseFont("Roman",0,23,BOLD,NOITALIC,NOUNDERLINE,64,0,0)
DrawText(84,5,"Oriel")
UseFont("Roman",0,23,BOLD,NOITALIC,NOUNDERLINE,255,0,0)
DrawText(83,5,"Oriel")
UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
DrawText(65,27,"The Graphics-Based Batch Language")
DrawText(100,32,"for")
DrawText(80,37,"Microsoft Windows 3.0")
{Draw text boxes}
UseBrush(SOLID,255,255,255) {White brush}
Set x1=72
Set x2=145
DrawRoundRectangle(x1,48,x2,60,2,2)
DrawRoundRectangle(x1,63,x2,75,2,2)
DrawRoundRectangle(x1,78,x2,90,2,2)
DrawRoundRectangle(x1,93,x2,105,2,2)
DrawRoundRectangle(x1,108,x2,120,2,2)
DrawRoundRectangle(x1,123,x2,135,2,2)
{Put the text in each box and a bitmap to left of each box}
UseFont("System",0,0,NOBOLD,ITALIC,NOUNDERLINE,0,0,0)
Set x=83
Set Bit_x=57
DrawBitmap(Bit_x,48,"ORIELICO.BMP")
DrawText(x,51,"Oriel Introduction")
DrawBitmap(Bit_x,63,"ORIELICO.BMP")
DrawText(x,66,"Oriel Features")
DrawBitmap(Bit_x,78,"ORIELICO.BMP")
DrawText(x,81,"Hypertext-like Example")
DrawBitmap(Bit_x,93,"ORIELICO.BMP")
DrawText(x,96,"Color Palette")
DrawBitmap(Bit_x,108,"ORIELICO.BMP")
DrawText(x,111,"Oriel Draw")
DrawBitmap(Bit_x,123,"ORIELICO.BMP")
DrawText(x,126,"Windows Applications")
{Put directions box to the left of buttons}
UseBrush(SOLID,255,255,128) {Cream-colored brush}
DrawRectangle(10,70,48,98)
UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
DrawText(13,74,"Click on an")
DrawText(13,79,"item to the")
DrawText(13,84,"right or select")
DrawText(13,89,"a menu option")
{Set up mouse input}
SetMouse(72,48,145,60,Do_Intro,Temp,Temp, {Intro button}
57,48,68,59,Do_Intro,Temp,Temp, {Intro icon}
72,63,145,75,Do_Features,Temp,Temp, {Features button}
57,63,68,74,Do_Features,Temp,Temp, {Features icon}
72,78,145,90,Do_Hyper,Temp,Temp, {Hypertext button}
57,78,68,89,Do_Hyper,Temp,Temp, {Hypertext icon}
72,93,145,105,Do_Color,Temp,Temp, {Color pal button}
57,93,68,104,Do_Color,Temp,Temp, {Color pal icon}
72,108,145,120,Do_Draw,Temp,Temp, {Oriel Draw button}
57,108,68,119,Do_Draw,Temp,Temp, {Oriel Draw icon}
72,123,145,135,Do_WinApps,Temp,Temp, {Win Apps button}
57,123,68,134,Do_WinApps,Temp,Temp, {Win Apps icon}
0,0,1000,1000,No_hit,Temp,Temp) {No hit anywhere}
{Wait for input}
Wait_for_Input:
If Mouse_message = 1 Then Goto Erase_mouse
SetWaitMode(NULL)
WaitInput()
{Put up a message when the user misses with the mouse}
No_hit:
Set Mouse_message = 1
UseBrush(SOLID,255,255,128) {Cream-colored brush}
DrawRectangle(165,80,187,97)
UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
DrawText(167,83,"Click on")
DrawText(167,89,"an item")
DrawLine(145,53,165,88) {Draw 1st line}
DrawLine(145,68,165,88) {Draw 2nd line}
DrawLine(145,83,165,88) {Draw 3rd line}
DrawLine(145,98,165,88) {Draw 4th line}
DrawLine(145,113,165,88) {Draw 5th line}
DrawLine(145,128,165,88) {Draw 6th line}
WaitInput(1000) {Pause 1 sec, then erase}
{Erase the message}
Erase_mouse:
UseBrush(SOLID,0,255,255)
UsePen(SOLID,1,0,255,255) {Use light blue pen}
DrawLine(145,53,165,88) {Erase 1st line}
DrawLine(145,68,165,88) {Erase 2nd line}
DrawLine(145,83,165,88) {Erase 3rd line}
DrawLine(145,98,165,88) {Erase 4th line}
DrawLine(145,113,165,88) {Erase 5th line}
DrawLine(145,128,165,88) {Erase 6th line}
DrawRectangle(165,80,187,97)
Set Mouse_message = 0
UsePen(SOLID,1,0,0,0) {Reset pen to default}
Goto Wait_for_Input
Do_Intro:
SetWaitMode(FOCUS)
Run("ORIEL INTRO.ORL")
WaitInput(1)
Goto Wait_for_Input
Do_Features:
SetWaitMode(FOCUS)
Run("ORIEL FEATURES.ORL")
WaitInput(1)
Goto Wait_for_Input
Do_Hyper:
SetWaitMode(FOCUS)
Run("ORIEL HYPER.ORL")
WaitInput(1)
Goto Wait_for_Input
Do_Color:
SetWaitMode(FOCUS)
Run("ORIEL COLOR.ORL")
WaitInput(1)
Goto Wait_for_Input
Do_Draw:
SetWaitMode(FOCUS)
Run("ORIEL DRAW.ORL")
WaitInput(1)
Goto Wait_for_Input
Do_WinApps:
SetWaitMode(FOCUS)
Run("ORIEL WINAPPS.ORL")
WaitInput(1)
Goto Wait_for_Input
Shut_Down:
MessageBox(YESNO,1,QUESTION,"Quit the program?",
"End Oriel Demo",Choice)
If Choice=2 then Goto Wait_for_Input
End